#pragma once
#include "groupuser.hpp"
#include <iostream>
#include <vector>

/////////////////////////////////////////////////////////////////////////////////////////////
/*

    Group是一个描述组信息的类
    
*/
class Group
{
public:
    Group(int id = -1, const std::string& name = "", const std::string& desc = "")
    :_id(id)
    ,_name(name)
    ,_desc(desc)
    {}
    /*············································

                      设置组的ID
    
    ············································*/
    void SetId(int id)
    {
        _id = id;
    }
    /*············································

                    设置组的名字
    
    ············································*/
    void SetName(const std::string& name)
    {
        _name = name;
    }
    /*············································

                    设置组的描述
    
    ············································*/
    void SetDesc(const std::string& desc)
    {
        _desc = desc;
    }
    /*············································

                      获取组的ID
    
    ············································*/
    int GetId()
    {
        return _id;
    }
    /*············································

                    获取组的名字
    
    ············································*/
    std::string GetName()
    {
        return _name;
    }
    /*············································

                    获取组的描述
    
    ············································*/
    std::string GetDesc()
    {
        return _desc;
    }
    /*············································

                    获取组员列表
    
    ············································*/
    std::vector<GroupUser>& GetUsers()
    {
        return _users; 
    }

private:
    int _id;
    std::string _name;
    std::string _desc;
    std::vector<GroupUser> _users;
};